[id].vue 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630
  1. <template>
  2. <!-- 页面头部 -->
  3. <HomePageHead></HomePageHead>
  4. <!-- 页面导航 -->
  5. <HomePageNavigation></HomePageNavigation>
  6. <!-- 广告1 -->
  7. <HomeAdvertising :imgurl="adImg1"></HomeAdvertising>
  8. <!-- 面包屑导航 -->
  9. <div class="breadcrumb">
  10. <div class="inner">
  11. <span class="location">当前位置:</span>
  12. <el-breadcrumb :separator-icon="ArrowRight">
  13. <el-breadcrumb-item>
  14. <NuxtLink to="/">首页</NuxtLink>
  15. </el-breadcrumb-item>
  16. <el-breadcrumb-item>
  17. <NuxtLink :to="`/${parent_pinyin}/index.html`">
  18. {{ routLevelTitle }}
  19. </NuxtLink>
  20. </el-breadcrumb-item>
  21. <el-breadcrumb-item>{{ routeNewsTtitle }}</el-breadcrumb-item>
  22. </el-breadcrumb>
  23. </div>
  24. </div>
  25. <!-- 资讯列表 -->
  26. <div class="newsDetail">
  27. <div class="inner">
  28. <div class="innerLeft">
  29. <div class="LeftTop">
  30. <h1>{{ newsDetail.title }}</h1>
  31. <p>
  32. 来源: <span>{{ newsDetail.copyfrom }}</span>
  33. 作者: <span>{{ newsDetail.author }}</span>
  34. 发布时间: <span>{{ time }}</span>
  35. </p>
  36. </div>
  37. <div class="leftBottom" v-html="newsDetail.content" v-if="newsDetail.content" @click="openPreview">
  38. </div>
  39. <div v-if="previewVisible" class="preview-modal" @click="closePreview">
  40. <img :src="selectedImage" alt="Preview">
  41. </div>
  42. <!-- 免责声明: -->
  43. <div class="disclaimer" v-if="newsDetail.fromurl">
  44. <p>原文链接:{{ newsDetail.fromurl }}</p>
  45. <p>[免责声明]本文来源于网络转载,仅供学习交流使用,不构成商业目的。 版权归原作者所有,如涉及作品内容,版权和其他问题,请在30日与本网联系,我们将第一时间处理。</p>
  46. </div>
  47. <div v-if="articleChoice">
  48. <!-- 投票 start ---------------------------------------->
  49. <div class="index_3_box_vote" v-if="articleChoice">
  50. <div class="voteTitle">投票区</div>
  51. <div class="inquire">
  52. <p v-if="voteList.length > 0">{{ voteList[0].survey_name }}</p>
  53. <div class="radioBox">
  54. <!--投票选项-->
  55. <div v-if="!isDisabled">
  56. <div class="radio" v-if="isRadio">
  57. <el-radio-group v-model="radio1" @change="handleRadioChange">
  58. <el-radio v-for="item in voteList" :key="item.id" :value="item.id"
  59. size="large">
  60. <span v-if="item.is_other == 0">{{ item.choice_name }}</span>
  61. <span v-else>其他</span>
  62. </el-radio>
  63. </el-radio-group>
  64. <el-input v-if="showUserChoice" v-model="userChoice" :rows="2" type="textarea"
  65. resize="none" placeholder="请输入.." />
  66. </div>
  67. <div class="checkInputBox" v-else>
  68. <el-checkbox-group v-model="check1" @change="handleCheckboxChange">
  69. <span v-for="item in voteList" :key="item.id">
  70. <span v-if="item.is_other == 0">
  71. <el-checkbox size="large" :label="item.choice_name"
  72. :value="item.id" />
  73. </span>
  74. <span v-else>
  75. <el-checkbox size="large" label="其他" :value="item.id" />
  76. </span>
  77. </span>
  78. </el-checkbox-group>
  79. <el-input v-if="showUserChoice" v-model="userChoice" :rows="2" type="textarea"
  80. resize="none" placeholder="请输入.." />
  81. </div>
  82. </div>
  83. <!--投票结果-->
  84. <div class="inquireData" v-else>
  85. <div v-for="item in websiteSurveyData.data" :key="item.id">
  86. <div class="inquireDataItem active" v-if="item.status == 1">
  87. <div class="inquireDataItemTitle">
  88. <span v-if="item.choice_name == ''">其他</span>
  89. <span v-else>{{ item.choice_name }}</span>
  90. </div>
  91. <div class="inquireDataItemNum">{{ item.results }}</div>
  92. </div>
  93. <div class="inquireDataItem" v-else>
  94. <div class="inquireDataItemTitle">
  95. <span v-if="item.choice_name == ''">其他</span>
  96. <span v-else>{{ item.choice_name }}</span>
  97. </div>
  98. <div class="inquireDataItemNum">{{ item.results }}</div>
  99. </div>
  100. </div>
  101. </div>
  102. </div>
  103. <div class="btn">
  104. <button class="voting" @click="addWebsiteSurvey" :disabled="isDisabled"
  105. v-if="!isDisabled">投票</button>
  106. </div>
  107. </div>
  108. </div>
  109. <!-- 投票 end ---------------------------------------->
  110. </div>
  111. </div>
  112. <div class="innerRight">
  113. <!-- 热点资讯1 -->
  114. <div class="hotList1">
  115. <DetailHotNews></DetailHotNews>
  116. </div>
  117. <!-- 热点资讯2 -->
  118. <div class="hotList2">
  119. <DetailHotNews2></DetailHotNews2>
  120. </div>
  121. </div>
  122. </div>
  123. </div>
  124. <!-- 广告2 -->
  125. <HomeAdvertising :imgurl="adImg2"></HomeAdvertising>
  126. <!-- 页面底部 -->
  127. <HomeFoot1></HomeFoot1>
  128. </template>
  129. <script setup>
  130. //1.页面依赖 start ---------------------------------------->
  131. import { onMounted } from 'vue'
  132. import { ElBreadcrumb, ElBreadcrumbItem, ElRadio, ElRadioGroup, ElMessage, ElCheckboxGroup, ElCheckbox, ElInput } from 'element-plus'
  133. import { ArrowRight } from '@element-plus/icons-vue'
  134. //1.1 获得跳转过来的id
  135. const route = useRoute();
  136. //获得详情id
  137. const articleId = parseInt(route.params.id); //获得该页面的id
  138. //获得当前的完整路径
  139. const fullPath = route.path;
  140. //拆分,取出来中间这一段,然后提取数字部分
  141. const segments = fullPath.split('/');
  142. const targetSegment = segments[1];
  143. // const numberPart = targetSegment.match(/\d+$/)?.[0];
  144. // let routeId = 20 //排除路径错误可以打开这个
  145. // const routeId = numberPart;
  146. let routeId;
  147. //通过导航路径反向查询导航id
  148. const getRouteId = await requestDataPromise('/web/getWebsiteRoute', {
  149. method: 'GET',
  150. query: {
  151. 'pinyin': targetSegment,
  152. },
  153. });
  154. if (getRouteId.code == 200) {
  155. routeId = getRouteId.data.category_id
  156. } else {
  157. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  158. console.log("错误位置:通过url路径查询导航池id")
  159. console.log("后端错误反馈:", getRouteId.message)
  160. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  161. }
  162. //1.2 获得父级栏目的名称、id
  163. const parent_name = ref([]);
  164. const parent_id = ref([]);
  165. const parent_pinyin = ref("");
  166. const parent_children_count = ref(0)
  167. let getParentNav = async () => {
  168. const listData = await requestDataPromise('/web/getOneWebsiteCategory', {
  169. method: 'GET',
  170. query: {
  171. 'catid': routeId
  172. },
  173. });
  174. console.log("获取父级栏目数据")
  175. console.log(listData)
  176. if (listData.code == 200) {
  177. console.log(listData.data);
  178. parent_name.value = listData.data.alias;
  179. parent_id.value = listData.data.parent_id;
  180. parent_pinyin.value = listData.data.aLIas_pinyin;
  181. parent_children_count = listData.data.children_coun;
  182. } else {
  183. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  184. console.log("错误位置:获取面包屑导航")
  185. console.log("后端错误反馈:", listData.message)
  186. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  187. }
  188. }
  189. //获得父级栏目详情
  190. getParentNav();
  191. //1.页面依赖 end ---------------------------------------->
  192. //2.页面数据 start ---------------------------------------->
  193. //2.1 资讯详情
  194. const newsDetail = ref({})
  195. const routeNewsTtitle = ref("");
  196. //2.2 发布日期
  197. const time = ref("");
  198. //2.3 路径
  199. const routLevelTitle = ref("");
  200. const routLevelId = ref("");
  201. //是否展示投票
  202. const articleChoice = ref(false);
  203. //2.4获取详情
  204. async function getPageData() {
  205. const mkdata = await requestDataPromise('/web/selectWebsiteArticleInfo', {
  206. method: 'GET',
  207. query: {
  208. 'articleid': articleId
  209. },
  210. });
  211. if (mkdata.code == 200) {
  212. //判断是否显示投票
  213. if (mkdata.data.is_survey == 1) {
  214. console.log("本篇文章含有投票!")
  215. articleChoice.value = true;
  216. getVoteList();
  217. }
  218. //获取内容
  219. newsDetail.value = mkdata.data;
  220. //获取路径
  221. routLevelTitle.value = newsDetail.value.cat_name;
  222. routLevelId.value = newsDetail.value.category_id;
  223. //获取发布时间
  224. time.value = newsDetail.value.updated_at.split(' ')[0];
  225. //修正标题长度
  226. if (newsDetail.value.title.length >= 20) {
  227. routeNewsTtitle.value = newsDetail.value.title.substr(0, 20) + "...";
  228. } else {
  229. routeNewsTtitle.value = newsDetail.value.title
  230. }
  231. } else {
  232. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  233. console.log("错误位置:获取详情内容")
  234. console.log("后端错误反馈:", mkdata.message)
  235. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  236. }
  237. }
  238. getPageData();
  239. //2.5 获得广告
  240. //广告列表
  241. let adImg1 = ref([]);
  242. let adImg2 = ref([]);
  243. onMounted(async () => {
  244. const { $webUrl, $CwebUrl } = useNuxtApp();
  245. //广告1
  246. let url = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=xcw_detail_0001`
  247. const responseAd1 = await fetch(url, {
  248. headers: {
  249. 'Content-Type': 'application/json',
  250. 'Userurl': $CwebUrl,
  251. 'Origin': $CwebUrl
  252. }
  253. });
  254. const resultAd1 = await responseAd1.json();
  255. adImg1.value = resultAd1.data[0];
  256. //广告2
  257. let url2 = `${$webUrl}/web/getWebsiteAdvertisement?ad_tag=xcw_detail_0002`
  258. const responseAd2 = await fetch(url2, {
  259. headers: {
  260. 'Content-Type': 'application/json',
  261. 'Userurl': $CwebUrl,
  262. 'Origin': $CwebUrl
  263. }
  264. });
  265. const resultAd2 = await responseAd2.json();
  266. adImg2.value = resultAd2.data[0];
  267. })
  268. //2.页面数据 end ---------------------------------------->
  269. //3.设置seo信息 start---------------------------------------->
  270. //3.1 设置seo信息
  271. const setData = await requestDataPromise('/web/selectWebsiteArticleInfo', {
  272. method: 'GET',
  273. query: {
  274. 'articleid': articleId
  275. },
  276. });
  277. if (setData.code == 200) {
  278. let seoTitle = setData.data.title;
  279. let seoDescription = setData.data.introduce;
  280. let seoKeywords = setData.data.keyword;
  281. let seoSuffix = setData.data.suffix;
  282. let seoName = setData.data.website_name;
  283. useSeoMeta({
  284. title: seoTitle + "_" + seoName + "_" + seoSuffix,
  285. meta: [
  286. { name: 'description', content: seoDescription + "_" + seoName + "_" + seoSuffix, tagPriority: 10 },
  287. { name: 'keywords', content: seoKeywords + "_" + seoName + "_" + seoSuffix, tagPriority: 10 }
  288. ]
  289. });
  290. } else {
  291. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  292. console.log("错误位置:设置详情页面SEO数据")
  293. console.log("后端错误反馈:", setData.message)
  294. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  295. }
  296. //3.设置seo信息 end---------------------------------------->
  297. //4.投票 start---------------------------------------->
  298. const radio1 = ref(''); //单选
  299. const check1 = ref([]); //多选
  300. const isDisabled = ref(false);//是否禁用提交按钮
  301. const isRadio = ref(true);//是否渲染单选
  302. const userSurId = ref('');//投票属于哪一篇文章
  303. const userChoice = ref('');//用于判断用户选择了其他选项以后,输入的值
  304. const userIsChoice = ref('');//用于判断其他选项目前是什么值
  305. const showUserChoice = ref(false);//是否显示其他输入框
  306. const websiteSurveyData = ref([]);//投票结果
  307. //3.2获得投票列表
  308. let voteList = ref([]);
  309. async function getVoteList() {
  310. const voteData = await requestHome('/web/getWebsiteSurvey', { method: 'GET', query: { 'art_id': articleId } });
  311. console.log(778899)
  312. console.log('778899', voteData)
  313. if (voteData.code == 200) {
  314. voteList.value = voteData.data;
  315. console.log(voteList.value)
  316. //判断显示单选还是多选
  317. //survey_type 0是单选 1是多选
  318. if (voteData.data[0].survey_type == 0) {
  319. isRadio.value = true;
  320. console.log("1111")
  321. } else {
  322. isRadio.value = false;
  323. }
  324. //把最后一个的值拿出来 用于判断用户是否选择了其他
  325. for (let item of voteData.data) {
  326. //如果含有其他
  327. if (item.is_other == 1) {
  328. userIsChoice.value = item.id;
  329. }
  330. }
  331. //用户投票属于哪一篇文章
  332. userSurId.value = voteData.data[0].sur_id;
  333. } else {
  334. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  335. console.log("错误位置:首页投票")
  336. console.log("后端错误反馈:", voteData.message)
  337. console.log("SSR waring ---------- SSR waring ---------- SSR waring ---------->")
  338. }
  339. }
  340. //3.2当用户选择了选项,判断是否展示其他输入框
  341. const handleRadioChange = (value) => {
  342. console.log('11111', value, userIsChoice.value);
  343. if (value == userIsChoice.value) {
  344. showUserChoice.value = true;
  345. } else {
  346. showUserChoice.value = false;
  347. }
  348. }
  349. const handleCheckboxChange = (value) => {
  350. if (value.includes(userIsChoice.value)) {
  351. showUserChoice.value = true;
  352. } else {
  353. showUserChoice.value = false;
  354. }
  355. }
  356. //3.2发起投票
  357. async function addWebsiteSurvey() {
  358. //判断当前是单选还是多选
  359. console.log(isRadio.value)
  360. if (isRadio.value) {
  361. console.log("用户单选!")
  362. if (radio1.value != '') {
  363. //先判断一下是否使用了其他选项
  364. if (showUserChoice.value) {
  365. if (userChoice.value != '') {
  366. //文章id
  367. // console.log(userSurId.value)
  368. // 用户输入的值
  369. // console.log(userChoice.value)
  370. //如果使用了其他,其他的选项需要增加进去
  371. const ChoiceData = await requestHome('/web/addWebsiteSurveyOption', {
  372. method: 'GET',
  373. query: {
  374. 'sur_id': userSurId.value,//投票的新闻id
  375. 'choice_name': userChoice.value,//投票的选项id
  376. }
  377. });
  378. if (ChoiceData.code == 200) {
  379. //提交完其他选项以后,再正式发起投票
  380. const mkData = await requestHome('/web/addWebsiteSurveyVote', {
  381. method: 'GET',
  382. query: {
  383. 'sur_id': userSurId.value,
  384. 'choice_id': ChoiceData.data
  385. }
  386. });
  387. if (mkData.code == 200) {
  388. ElMessage.success('投票成功!')
  389. //把投票结果显示到页面上 禁用投票按钮
  390. isDisabled.value = true;
  391. websiteSurveyData.value = mkData.data;
  392. //遍历一下,把用户选中的那个设置status为1
  393. let data = mkData.data;
  394. //遍历一下,把用户选中的那个设置status为1
  395. for (let item of data.data) {
  396. for (let i of data.choice) {
  397. if (item.id == i) {
  398. console.log(item.id)
  399. item.status = 1;
  400. }
  401. }
  402. }
  403. websiteSurveyData.value = data;
  404. } else {
  405. ElMessage.error(mkData.message)
  406. }
  407. } else {
  408. ElMessage.error('其他投票失败!')
  409. }
  410. } else {
  411. ElMessage.error('请输入选项内容!')
  412. }
  413. } else {
  414. console.log('111', userSurId.value);
  415. console.log('222', radio1.value);
  416. //如果没选择其他,直接提交选择的内容
  417. const mkData = await requestHome('/web/addWebsiteSurveyVote', {
  418. method: 'GET',
  419. query: {
  420. 'sur_id': userSurId.value,
  421. 'choice_id': radio1.value
  422. }
  423. });
  424. if (mkData.code == 200) {
  425. ElMessage.success('投票成功!')
  426. //把投票结果显示到页面上 禁用投票按钮
  427. isDisabled.value = true;
  428. let data = mkData.data;
  429. //遍历一下,把用户选中的那个设置status为1
  430. for (let item of data.data) {
  431. for (let i of data.choice) {
  432. if (item.id == i) {
  433. item.status = 1;
  434. }
  435. }
  436. }
  437. websiteSurveyData.value = data;
  438. } else {
  439. ElMessage.error('投票失败!')
  440. }
  441. }
  442. } else {
  443. ElMessage.error('请选择一个选项')
  444. }
  445. } else {
  446. console.log("多选!")
  447. //多选
  448. if (check1.value != []) {
  449. //先判断一下是否使用了其他选项
  450. if (showUserChoice.value) {
  451. if (userChoice.value != '') {
  452. //判断用户是否只选择了一个其他
  453. if (check1.value.length == 1) {
  454. const ChoiceData = await requestDataPromise('/web/addWebsiteSurveyOption', {
  455. method: 'GET',
  456. query: {
  457. 'sur_id': userSurId.value,//投票的新闻id
  458. 'choice_name': userChoice.value,//用户输入的其他选项文字
  459. }
  460. });
  461. if (ChoiceData.code == 200) {
  462. //提交完其他选项以后,再正式发起投票
  463. const mkData = await requestDataPromise('/web/addWebsiteSurveyVote', {
  464. method: 'GET',
  465. query: {
  466. 'sur_id': userSurId.value,
  467. 'choice_id': ChoiceData.data
  468. }
  469. });
  470. if (mkData.code == 200) {
  471. ElMessage.success('投票成功!')
  472. //把投票结果显示到页面上 禁用投票按钮
  473. isDisabled.value = true;
  474. websiteSurveyData.value = mkData.data;
  475. //遍历一下,把用户选中的那个设置status为1
  476. let data = mkData.data;
  477. //遍历一下,把用户选中的那个设置status为1
  478. for (let item of data.data) {
  479. for (let i of data.choice) {
  480. if (item.id == i) {
  481. console.log(item.id)
  482. item.status = 1;
  483. }
  484. }
  485. }
  486. websiteSurveyData.value = data;
  487. } else {
  488. ElMessage.error(mkData.message)
  489. }
  490. } else {
  491. ElMessage.error('其他投票失败!')
  492. }
  493. } else {
  494. //用户选择了除了其他以外,还包括别的选项
  495. const ChoiceData = await requestDataPromise('/web/addWebsiteSurveyOption', {
  496. method: 'GET',
  497. query: {
  498. 'sur_id': userSurId.value,//投票的新闻id
  499. 'choice_name': userChoice.value,//用户输入的其他选项文字
  500. }
  501. });
  502. if (ChoiceData.code == 200) {
  503. let data = check1.value;
  504. //找到多选的数组,把其他默认值给替换掉
  505. for (let i = 0; i < data.length; i++) {
  506. if (data[i] == userIsChoice.value) {
  507. data[i] = ChoiceData.data;
  508. }
  509. }
  510. let jsonArray = JSON.stringify(data);
  511. //提交完其他选项以后,再正式发起投票
  512. const mkData = await requestDataPromise('/web/addWebsiteSurveyVote', {
  513. method: 'GET',
  514. query: {
  515. 'sur_id': userSurId.value,
  516. 'choice_id': jsonArray
  517. }
  518. });
  519. if (mkData.code == 200) {
  520. ElMessage.success('投票成功!')
  521. //把投票结果显示到页面上 禁用投票按钮
  522. isDisabled.value = true;
  523. websiteSurveyData.value = mkData.data;
  524. //遍历一下,把用户选中的那个设置status为1
  525. let data = mkData.data;
  526. //遍历一下,把用户选中的那个设置status为1
  527. for (let item of data.data) {
  528. for (let i of data.choice) {
  529. if (item.id == i) {
  530. //console.log(item.id)
  531. item.status = 1;
  532. }
  533. }
  534. }
  535. websiteSurveyData.value = data;
  536. } else {
  537. ElMessage.error(mkData.message)
  538. }
  539. } else {
  540. ElMessage.error('其他投票失败!')
  541. }
  542. }
  543. } else {
  544. ElMessage.error('请输入选项内容!')
  545. }
  546. } else {
  547. let jsonArray = JSON.stringify(check1.value);
  548. //如果没选择其他,直接提交选择的内容
  549. const mkData = await requestDataPromise('/web/addWebsiteSurveyVote', {
  550. method: 'GET',
  551. query: {
  552. 'sur_id': userSurId.value,
  553. 'choice_id': jsonArray
  554. }
  555. });
  556. if (mkData.code == 200) {
  557. ElMessage.success('投票成功!')
  558. //把投票结果显示到页面上 禁用投票按钮
  559. isDisabled.value = true;
  560. websiteSurveyData.value = mkData.data;
  561. //遍历一下,把用户选中的那个设置status为1
  562. let data = mkData.data;
  563. //遍历一下,把用户选中的那个设置status为1
  564. for (let item of data.data) {
  565. for (let i of data.choice) {
  566. if (item.id == i) {
  567. console.log(item.id)
  568. item.status = 1;
  569. }
  570. }
  571. }
  572. websiteSurveyData.value = data;
  573. } else {
  574. ElMessage.error('投票失败!')
  575. }
  576. }
  577. } else {
  578. ElMessage.error('请选择一个选项')
  579. }
  580. }
  581. }
  582. //4.投票 end---------------------------------------->
  583. //5.页面图片放大 start---------------------------------------->
  584. const previewVisible = ref(false)
  585. const selectedImage = ref(' ')
  586. const openPreview = (event) => {
  587. if (event.target.tagName === 'IMG') {
  588. selectedImage.value = event.target.src;
  589. previewVisible.value = true;
  590. }
  591. }
  592. const closePreview = () => {
  593. previewVisible.value = false;
  594. }
  595. //5.页面图片放大 end---------------------------------------->
  596. </script>
  597. <style lang="less" scoped>
  598. @import url('@/assets/css/detail.less');
  599. </style>